<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js" type="text/javascript"></script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js" type="text/javascript"></script>
<script type="text/javascript">

    $(function () {
        $.ajax({
            url:'/validate',
            type: "GET",
            datatype:"JSON",
            success: function (data) {
                $(".imageURL").attr("src",data);
            },
            error: function () {
                console.log("ERROR");
            }
        });
    })
</script>
<body>
    <form action="/user/login" method="post" >
        <input name="mobile" value=""/>
        <input name="password" value=""/>
        <input name="code" value=""/>
        <img src="" name="codes" class = "imageURL" alt="验证码">
        <button type="submit" >提交</button>
    </form>
</body>
</html>